<%@ page import="cn.ecut.User" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: lujiapeng
  Date: 2020/9/16
  Time: 9:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<%
    User user = new User() ;
    user.setPassword("123123");
    user.setName("张三");

    User user2 = new User() ;
    user.setName("lisi");
    user.setPassword("456789");

    User user3 = new User() ;
    user.setName("王五");
    user.setPassword("456789");

    User user4 = new User() ;
    user.setName("赵六");
    user.setPassword("456789");

    List<User> list = new ArrayList<>() ;
    list.add( user ) ;
    list.add( user2 ) ;
    list.add( user3 ) ;
    list.add( user4 ) ;

    // 将 集合存放在 一个区域中
    request.setAttribute("userList" , list );

%>
<body>

    <c:if test="${ not empty userList   }">
        <h1>我是true 的时候，才能看见</h1>
    </c:if>

</body>
</html>
